// import{combineReducers} from 'redux'
import{combineReducers} from 'redux-immutable'
import {reducer as headerReducer} from '../common/header/store/index'
import  {reducer as homeReducer} from '../pages/home/store/index'
import  {reducer as detailReducer} from '../pages/detail/store/index'
import  {reducer as loginReducer} from '../pages/login/store/index'

//将最外层的state变成不可变对象，否则mapStateToProps里取immutable对象写法得focused: state.header.get('focused')
// 为了解决这个问题，redux-immutable可以将最外层的state变为immutable对象
// 只需要import{combineReducers} from 'redux-immutable'

// reducer就是图书馆的手册
// 这里使用combineReducer是将各个小的reducer合并，方便管理
const reducer =  combineReducers({
    header: headerReducer,
    home: homeReducer,
    detail: detailReducer,
    login: loginReducer,
})

export default reducer;